<%@ page language="java" contentType="text/html; charset=utf-8" isELIgnored="false"
    pageEncoding="utf-8"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	 <%int i = 1; %>
  <div id="workspace" class="col-md-12">
  <br/>
                <ol class="breadcrumb">
                    <li><a href="index.jsp"><span class="glyphicon glyphicon-home"></span>&nbsp;后台首页</a></li>
                    <c:choose>
                    	<c:when test="${sessionScope.queryMyAll ne null }"><li class="active">资产查询 - 所有资产</li></c:when>
                    	<c:when test="${sessionScope.queryAssetAccount ne null }"><li class="active">资产查询 - 帐目查询</li></c:when>
                   		<c:when test="${sessionScope.queryMyAllRepair ne null }"><li class="active">资产变动 - 维修情况</li></c:when>
                    </c:choose>
                    	
                </ol><br>
   <table  class="table table-bordered table-striped text-center bg-info">
   <c:choose>
   	<c:when test="${sessionScope.queryMyAll ne null}">
	<thead>
		<tr class="info">
			<th class="text-center">编号</th>
			<th class="text-center">名字</th>
			<th class="text-center">种类</th>
			<th class="text-center">数量</th>
			<th class="text-center">地址</th>
			<th class="text-center">采购人</th>
			<th class="text-center">采购价格</th>
			<th class="text-center">审核状态</th>
			<th class="text-center">入库时间</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="asset" items="${sessionScope.queryMyAll }">
		<tr class="info">
			<td>${asset.id }</td>
			<td>${asset.name }</td>
			<td>${asset.category }</td>
			<td>${asset.number }</td>
			<td>${asset.address }</td>	
			<td>${asset.purchaser }</td>
			<td>${asset.purchasingValue }</td>
			<c:if test="${asset.state == '1' }"><td>审核中</td><td>xxxx-xx-xx</td>	</c:if>
			<c:if test="${asset.state == '0' }"><td>已通过</td><td>${asset.storageTime }</td>	</c:if>
		</tr>
		</c:forEach>
		<%session.removeAttribute("queryMyAll"); %> 
	</tbody>
	</c:when>
	<c:when test="${sessionScope.queryAssetAccount ne null }">
	<thead>
		<tr class="info">
			<th class="text-center">编号</th>
			<th class="text-center">名字</th>
			<th class="text-center">种类</th>
			<th class="text-center">数量</th>
			<th class="text-center">入库时间</th>
			<th class="text-center">入库价格</th>
			<th class="text-center">出库时间</th>
			<th class="text-center">出库价格</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="asset" items="${sessionScope.queryAssetAccount }">
		<tr class="info">
			<td>${asset.id }</td>
			<td>${asset.name }</td>
			<td>${asset.category }</td>
			<td>${asset.number }</td>
			<td>${asset.storageTime }</td>	
			<td>${asset.orginalPrice }</td>	
			<td>${asset.sellTime }</td>	
			<td>${asset.sellPrice }</td>
		</tr>
		</c:forEach>
		<%session.removeAttribute("queryAssetAccount"); %> 
	</tbody>
	</c:when>
	<c:when test="${sessionScope.queryMyAllRepair ne null }">
	<thead>
		<tr class="info">
			<th class="text-center">编号</th>
			<th class="text-center">名字</th>
			<th class="text-center">地点</th>
			<th class="text-center">维修数量</th>
			<th class="text-center">维修人</th>
			<th class="text-center">维修价格</th>
			<th class="text-center">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="asset" items="${sessionScope.queryMyAllRepair }">
		<c:if test="${asset.auditor == null }">
		<tr class="info">
			<td>${asset.id }</td>
			<td>${asset.name }</td>
			<td>${asset.address }</td>
			<td>${asset.number2 }</td>
			<td>${asset.repair }</td>	
			<td>${asset.cost }</td>	
			<td>
				<a href="worker.con?work=endRepair&id=${asset.id }&name=${asset.name }&address=${asset.address}&number2=${asset.number2 }&repair=${asset.repair }&cost=${asset.cost }"  class="tooltip-show" data-toggle="tooltip" title="结束维修状态"><span class="glyphicon glyphicon-arrow-right"></span></a> 
			</td>	
		</tr>
		</c:if>
		</c:forEach>
		<%session.removeAttribute("queryMyAllRepair"); %> 
	</tbody>
	</c:when>
   </c:choose>
   </table>
   				<ul class="pagination right">
                    <li class="disabled"><a href="#" aria-label="Previous"><span aria-hidden="true">&laquo;</span></a>
                    </li>
                    <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li>
                    <li><a href="#">2</a></li>
                    <li><a href="#">3</a></li>
                    <li><a href="#">4</a></li>
                    <li><a href="#">5</a></li>
                    <li><a href="#" aria-label="Next"><span aria-hidden="true">&raquo;</span></a></li>
                </ul>
   </div>
</body>
</html>